import logging

from pylons import request, response, session, tmpl_context as c, url
from pylons.controllers.util import abort, redirect, redirect_to

from arkaiv.lib.base import BaseController, render
from authkit.authorize.pylons_adaptors import authorize
from authkit.permissions import RemoteUser, ValidAuthKitUser, UserIn

from arkaiv.lib.base import BaseController, render

log = logging.getLogger(__name__)

class AdminController(BaseController):

    def index(self):
        # Return a rendered template
        #return render('/admin.mako')
        # or, return a response
        return 'Hello World'

    @authorize(ValidAuthKitUser())
    def login(self):
        return redirect_to(controller='list', action='index')

    def logout(self):
        return "Successfully signed out!"

#log = logging.getLogger(__name__)
#
#class AdminController(BaseController):
#
#    def index(self):
#        # Return a rendered template
#        #return render('/admin.mako')
#        # or, return a response
#        return 'Hello World'
